/*

 Copyright (c) 2008-2009 Fabrizio Pistonesi

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

 */
#ifndef _ETERNITY3D_H_
#define _ETERNITY3D_H_

#include <irrlicht.h>
/*
extern "C"
{
    #include "lua.h"
    #include "lualib.h"
    #include "lauxlib.h"
}
*/
#include "scenemngr.h"
#include <string>   //a.viarengo  std string
#include <vector>   //a.viarengo  std dinamic vector

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

//!EternitY3D engine class
/*!
Main class to start the engine
*/

//!Constructor
class EternitY3D : public IEventReceiver
{
public:
    //!This is the main Irrlicht device. It will be used for most of the other classes
    IrrlichtDevice *Device;
    //!Just the video driver pointer: device->getVideoDriver()
    IVideoDriver *Driver;
    //!Pointer to the FIleSystem object.
    IFileSystem *FileSystem;
    //!Pointer to the Irrlicht logger.
    ILogger *Logger;
    //!Pointer to the Irrlicht cursor control.
    ICursorControl *CursorControl;
    //! return the key pressed.

    SceneMngr* SceneMgr;

    stringc Project, Title;
    bool SpecialFX;
    int StartNode;

    int Nid;
    //! A constructor.
    /*!
      A more elaborate description of the constructor.
    */
    EternitY3D(void);
    EternitY3D(stringc project);

    //!Destructor
    virtual ~EternitY3D();
    //!Event receiver
    /*!
        Will be handle the main input events.
    */
    //virtual bool OnEvent(const SEvent& event);
    virtual bool OnEvent(const SEvent& event);

    bool loadSettings();

    bool run();

};

#endif // _ETERNITY3D_H_
